package com.hy.study.listener;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author huyong
 * @date 2024 年 01 月 05 日 9:55: 45
 */
@Component
public class TestApplicationListener implements ApplicationListener<TestPublicApplicationEvent> {

    private static final Logger log= Logger.getLogger(TestApplicationListener.class);

    @Override
    public void onApplicationEvent(TestPublicApplicationEvent testPublicApplicationEvent) {
        log.info("接收到了:"+testPublicApplicationEvent.getSource());
    }
}
